﻿using System;
using System.ComponentModel;
using System.Windows.Forms;
using YArchitech.HCLoad.Parameters;

namespace YArchitech.HCLoad.Query
{
	[TypeConverter(typeof(PropertySort))]
	public class PropertyGridAttritute
	{
		public SpaceAttribute SpaceAttribute
		{
			get
			{
				return this.m_spaceAttribute;
			}
		}

		public PropertyGridAttritute(SpaceAttribute att)
		{
			this.m_spaceAttribute = att;
		}

		public string Category
		{
			get
			{
				return this.m_spaceAttribute.Group.Name;
			}
		}

		public int PropertyOrder
		{
			get
			{
				return this.m_spaceAttribute.PropId;
			}
		}

		public string Name
		{
			get
			{
				return this.m_spaceAttribute.Name;
			}
		}

		public object Value
		{
			get
			{
				return this.theValue;
			}
			set
			{
				this.theValue = value;
			}
		}

		public string Description
		{
			get
			{
				return this.m_spaceAttribute.Remark;
			}
		}

		private SpaceAttribute m_spaceAttribute;

		private object theValue;
	}
}
